@extends('admin.layout')

@section('title', '信息统计')

@section('body')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">

                <div class="layui-card">
                    <div class="layui-card-header">我的信息</div>
                    <div class="layui-card-body">
                        <table class="layui-table">
                            <colgroup>
                                <col width="160">
                                <col width="">
                            </colgroup>
                            <tbody>
                            <tr>
                                <td>用户名</td>
                                <td>{{ $username }}</td>
                            </tr>
                            <tr>
                                <td>上次登录</td>
                                <td>{{ date('Y-m-d H:i:s', $lastLoginTime) }}</td>
                            </tr>
                            <tr>
                                <td>浏览器UA</td>
                                <td>{{ $userAgent }}</td>
                            </tr>
                            <tr>
                                <td>请求的域名</td>
                                <td>{{ $httpHost }}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header">系统信息</div>
                    <div class="layui-card-body">
                        <table class="layui-table">
                            <colgroup>
                                <col width="160">
                                <col width="">
                            </colgroup>
                            <tbody>
                            <tr>
                                <td>运行模式</td>
                                <td>
                                    @if (config('app.debug'))
                                        调试模式
                                        &emsp;
                                        <span style="color:#FF5722">警告：调试模式会输出报错信息</span>
                                    @else
                                        生产环境
                                    @endif
                                </td>
                            </tr>
                            <tr>
                                <td>首页地址</td>
                                <td><a href="{{ config('app.url') }}" target="_blank">{{ config('app.url') }}</a></td>
                            </tr>
                            <tr>
                                <td>文章统计</td>
                                <td>
                                    <i class="layui-icon layui-icon-ok" style="color:#5FB878"></i>已发布：{{ $articleCount1 }}篇
                                    &emsp;
                                    <i class="layui-icon layui-icon-survey"></i>草稿箱：{{ $articleCount0 }}篇
                                    &emsp;
                                    <i class="layui-icon layui-icon-delete"
                                       style="color:#FFB800;font-size:18px"></i>回收站：{{ $articleCount2 }}篇
                                </td>
                            </tr>
                            <tr>
                                <td>评论统计</td>
                                <td>
                                    评论总数：{{ $commentCount1 }}条
                                    &emsp;
                                    自上次登录新增：{{ $commentCount2 }}条
                                </td>
                            </tr>
                            <tr>
                                <td>服务器时间</td>
                                <td>{{ date('Y-m-d H:i:s') }}</td>
                            </tr>
                            <tr>
                                <td>时区设定</td>
                                <td>{{ ini_get('date.timezone') }}</td>
                            </tr>
                            <tr>
                                <td>操作系统</td>
                                <td>{{ php_uname() }}</td>
                            </tr>
                            <tr>
                                <td>WEB软件</td>
                                <td>{{ $serverSoftware }}</td>
                            </tr>
                            <tr>
                                <td>MySQL版本</td>
                                <td>{{ $mysqlVersion }}</td>
                            </tr>
                            <tr>
                                <td>PHP版本</td>
                                <td>{{ PHP_VERSION }}</td>
                            </tr>
                            <tr>
                                <td>SAPI接口</td>
                                <td>{{ PHP_SAPI }}</td>
                            </tr>
                            <tr>
                                <td>运行内存限制</td>
                                <td>{{ ini_get('memory_limit') }}</td>
                            </tr>
                            <tr>
                                <td>POST提交限制</td>
                                <td>{{ ini_get('post_max_size') }}</td>
                            </tr>
                            <tr>
                                <td>上传文件限制</td>
                                <td>{{ ini_get('upload_max_filesize') }}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
@endsection
